# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年12月02日
"""
import pandas as pd

pd.set_option('display.max_columns',500)
pd.set_option('display.width', 1000)
pd.set_option('display.unicode.east_asian_width',True)
df = pd.read_csv('../source/JD.csv',encoding='gbk')
print(df.head())
print("=" *30)
df1 = df[['一级分类', '二级分类','7天点击量','订单预定']]
df1 = df1.groupby('二级分类')['7天点击量'].sum()
print(df1)
df1.to_excel('111.xlsx')